Skip to content

Conversation

teemingc
Copy link
Member

@teemingc teemingc commented Sep 26, 2025

fixes #13
closes sveltejs/kit#13809

This PR fixes 3 scenarios and adds tests for them:

  1. async arrow function declaration with generic
  2. async arrow function declaration with generic proceeding an import statement
  3. async arrow function declaration with generic proceeding an import statement that is commented out

It fixes 1 by avoiding a null pointer issue. It fixes 2 and 3 by adding the correct type for those Acorn parser properties so that we don't access something that doesn't exist.

Copy link

changeset-bot bot commented Sep 26, 2025

🦋 Changeset detected

Latest commit: 3b47f3a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/acorn-typescript Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@dummdidumm dummdidumm merged commit 31344cd into main Sep 26, 2025
3 checks passed
@dummdidumm dummdidumm deleted the fix-function-declaration-generic branch September 26, 2025 13:19
@github-actions github-actions bot mentioned this pull request Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants